﻿using System.Web.Mvc;
using System.Web.Mvc.Html;

namespace JStore.Web.Controllers.HtmlHelpers
{
    public static class JStoreHtmlHelper
    {
        public static MvcHtmlString UserDetail(this HtmlHelper htmlHelper, string userName)
        {
            if (string.IsNullOrEmpty(userName))
                return MvcHtmlString.Create(string.Empty);

            return htmlHelper.ActionLink(userName, "UserDetail", "Users", new { userName }, new { @class = "box" });
        }
    }
}